package com.wilcom.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wilcom.system.domain.User;
import com.wilcom.system.mapper.UserMapper;
import com.wilcom.system.model.request.user.LoginUser;
import com.wilcom.system.service.UserService;
import org.springframework.stereotype.Service;

/**
* @author lishi
* @description 针对表【user】的数据库操作Service实现
* @createDate 2024-06-22 02:34:05
*/
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User>
    implements UserService{

    @Override
    public User getUser(LoginUser loginUser) {
        QueryWrapper<User> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("user_name",loginUser.getUserName());
        queryWrapper.eq("password",loginUser.getPassword());
        return getOne(queryWrapper);
    }
}




